﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="__STATIC__/lib/html5shiv.js"></script>
    <script type="text/javascript" src="__STATIC__/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="__STATIC__/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
 <style type="text/css" media="screen">
    /*.p_box {text-align: center}*/
    #pagination-digg li { border:0; margin-top:10px; padding:0; font-size:14px; list-style:none; /* savers */ float: left }
    #pagination-digg a { border:solid 1px #9aafe5; margin-right:2px; }
    #pagination-digg .previous-off,#pagination-digg .next-off  { border:solid 1px #DEDEDE; color:#888888; display:block; float:left; font-weight:bold; margin-right:2px; padding:3px 4px; }
    #pagination-digg .next a,#pagination-digg .previous a { font-weight:bold; }
    #pagination-digg .active { background:#3b80dc; color:#FFFFFF; font-weight:bold; display:block; float:left; padding:4px 6px; /* savers */ margin-right:2px; }
    #pagination-digg a:link,#pagination-digg a:visited { color:#0e509e; display:block; float:left; padding:3px 6px; text-decoration:none; }
    #pagination-digg a:hover { border:solid 1px #0e509e; }
 </style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span> 店铺管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">


		<div class="text-c">
            <form action="Merchant_list" method="get">
                <input type="text" name="sou" id="" placeholder="店铺名称" style="width:250px" class="input-text">
                <button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜店铺</button>
            </form>
        </div>

	<div class="mt-20">
    
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr class="text-c">
			
				<th width="20">ID</th>
				<th width="70">商家名称</th>
				<th width="80">店铺名称</th>
				<th width="80">店铺logo</th>
				<th width="90">店铺地址</th>
				<th width="80">添加时间</th>
				<th width="">店铺简介</th>
				<th width="80">商家手机号</th>
				<th width="80">商家QQ号</th>
				
				<th width="50">操作</th>
			</tr>
		</thead>
		<tbody>
		<?php foreach ($data as $key => $val){ ?>
			<tr class="text-c">
			   
				<td><?php echo $val['merchant_id'] ?></td>
				<td><?php echo $val['merchant_username'] ?></td>
				<td><?php echo $val['merchant_name'] ?></td>
				<td><img src="__ROOT__/<?php echo $val['merchant_logo'] ?>" whdit="70" height="60" alt=""></td>
				<td><?php echo $val['merchant_address'] ?></td>
				<td><?php echo $val['addtime'] ?></td>
				<td><?php echo $val['merchant_content'] ?></td>
				<td><?php echo $val['merchant_tel'] ?></td>
				<td><?php echo $val['merchant_qq'] ?></td>
			
				<td class="td-manage">
					<select name="" class="abc" where="<?php echo $val['merchant_id'] ?>">
					  <?php if ($val['merchant_status']==0){ ?>
						  	<option value="0" selected>待审核</option>
							<option value="1">审核通过</option>
							<option value="2">审核未通过</option>
					  <?php } ?>
					  <?php if ($val['merchant_status']==1){ ?>
						  	<option value="0">待审核</option>
							<option value="1" selected>审核通过</option>
							<option value="2">审核未通过</option>
					  <?php } ?>
					  <?php if ($val['merchant_status']==2){ ?>
						  	<option value="0">待审核</option>
							<option value="1">审核通过</option>
							<option value="2" selected>审核未通过</option>
					  <?php } ?>
					</select>
				</td>
			</tr>
		 <?php } ?>
		</tbody>
	</table>
	<div class="p_box">
            <ul id="pagination-digg">
               <li class="next"><a href="{:url('index/Merchant/merchant_list')}?page=1&sou=<?php echo $sou ?>">首页 &raquo;</a></li>
                <li><a href="{:url('index/Merchant/merchant_list')}?page=<?php echo $page_arr['prev'] ?>&sou=<?php echo $sou ?>">上一页</a></li>
                <!-- <li class="active"><a href="{:url('index/Merchant/merchant_list')}?page=1"></a>1</li>
                <li><a href="{:url('index/Merchant/merchant_list')}?page=2">2</a></li>
                <li><a href="{:url('index/Merchant/merchant_list')}?page=3">3</a></li>
                <li><a href="{:url('index/Merchant/merchant_list')}?page=4">4</a></li>
                <li><a href="{:url('index/Merchant/merchant_list')}?page=5">5</a></li> -->
                <li><a href="{:url('index/Merchant/merchant_list')}?page=<?php echo $page_arr['next'] ?>&sou=<?php echo $sou ?>">下一页</a></li>
                <li class="next"><a href="{:url('index/Merchant/merchant_list')}?page=<?php echo $page_arr['last'] ?>&sou=<?php echo $sou ?>">尾页 &raquo;</a></li>
            </ul>
    </div>
	</div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="__STATIC__/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__STATIC__/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="__STATIC__/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__STATIC__/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="__STATIC__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__STATIC__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__STATIC__/lib/laypage/1.2/laypage.js"></script>

<script type="text/javascript">
$(document).on('change','.abc',function(){
	//alert(1)
	var merchant_id=$(this).attr('where');
	var merchant_status=$(this).val();
	var _this=$(this);

    $.ajax({
		   url:"{:url('index/merchant/merchant_gai')}",
	       data:{merchant_id:merchant_id,merchant_status:merchant_status},

	       success:function(res){
	       	   if(res=='1'){
                   alert("修改成功")
	       	   }else{
	       	   	   alert("修改失败")
	       	   }
	       }
	 })

});
</script>
</body>
</html>